package com.gxa.common.util;

import cn.hutool.core.lang.Snowflake;

/**
 * Created by zxd on 2023/11/10
 */
public class IdGenerator {

    private static long workerId=1;  // 工作节点ID
    private static long dataCenterId=1;  // 数据中心ID
    private static Snowflake snowflake=new Snowflake();  // 雪花算法对象


    public static long generateId() {
        return snowflake.nextId();
    }

}
